[angle0_output, angle6_result, compound_result, comparison_result] = CompoundPlaneWaveSimulation();

figure;
imagesc(angle0_output.Xposition,angle0_output.Zposition,angle0_output.image);
colormap gray
title('DAS image with the 0^{st} tilt angle','fontsize',16,'fontname','Times','FontWeight','bold')
ylabel(angle0_output.YTickLabel);
xlabel(angle0_output.YTickLabel);
set(gca, 'box', 'off',...
         'linewidth',4.5,...
         'TickDir','in',...
         'fontsize',16,'fontname','Times','FontWeight','bold')
ax = axes('Position',get(gca,'Position'),...
           'XAxisLocation','top',...
           'YAxisLocation','right',...
           'Color','none');
set(ax, 'linewidth',4.5,...
        'XTick', [],...
        'YTick', []);
axis equal ij

figure;
imagesc(angle6_result.Xposition,angle6_result.Zposition,angle6_result.image);
colormap gray
title('DAS image with the 6^{st} tilt angle','fontsize',16,'fontname','Times','FontWeight','bold')
ylabel(angle6_result.YTickLabel);
xlabel(angle6_result.YTickLabel);
set(gca, 'box', 'off',...
         'linewidth',4.5,...
         'TickDir','in',...
         'fontsize',16,'fontname','Times','FontWeight','bold')
ax = axes('Position',get(gca,'Position'),...
           'XAxisLocation','top',...
           'YAxisLocation','right',...
           'Color','none');
set(ax, 'linewidth',4.5,...
        'XTick', [],...
        'YTick', []);
axis equal ij

figure;
imagesc(compound_result.Xposition,compound_result.Zposition,compound_result.image);
colormap gray
title('PW-based DAS image with compound 11 angles','fontsize',16,'fontname','Times','FontWeight','bold')
ylabel(compound_result.YTickLabel);
xlabel(compound_result.YTickLabel);
set(gca, 'box', 'off',...
         'linewidth',4.5,...
         'TickDir','in',...
         'fontsize',16,'fontname','Times','FontWeight','bold')
ax = axes('Position',get(gca,'Position'),...
           'XAxisLocation','top',...
           'YAxisLocation','right',...
           'Color','none');
set(ax, 'linewidth',4.5,...
        'XTick', [],...
        'YTick', []);
axis equal ij

figure
plot(comparison_result.OneAngle,'LineWidth', 3)
hold on
plot(comparison_result.compound,'LineWidth', 3)

set(gca, 'box', 'off',...
    'linewidth',4.5,...
    'TickDir','in',...
    'fontsize',16,'fontname','Times','FontWeight','bold')
xlabel(comparison_result.XAxisLabel);
ylabel(comparison_result.YAxisLabel);
grid on
legend(comparison_result.legend);
ax = axes('Position',get(gca,'Position'),...
    'XAxisLocation','top',...
    'YAxisLocation','right',...
    'Color','none');
set(ax, 'linewidth',4.5,...
    'XTick', [],...
    'YTick', []);
title('RF from 64^{th} element (0^{st} titl angle, 1^{st} frame)','fontsize',16,'fontname','Times','FontWeight','bold')
axis tight
